﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;

namespace InstantSpine.Core.MaterialModels
{
    /// <summary>
    /// hyperelastic material, defined by provided uniaxial test data
    /// consisting of (stress, strain) pairs
    /// </summary>
    [DataContract]
    public sealed class MarlowUniaxialMaterial: MaterialViewModel
    {
        /// <summary>
        /// list of (nominal stress, nominal strain) pairs from an uniaxial material test
        /// </summary>
        [DataMember]
        public ObservableCollection<StressStrainPair> UniaxialTestData {
            get;
            private set;
        }

        public MarlowUniaxialMaterial(string name = null): base(name) {
            this.UniaxialTestData = new ObservableCollection<StressStrainPair>();            
        }

        public MarlowUniaxialMaterial(IEnumerable<StressStrainPair> uniaxialTestData, string name = null): base(name) {
            this.UniaxialTestData = new ObservableCollection<StressStrainPair>(uniaxialTestData);
        }

        // required for XML serialization to work
        public MarlowUniaxialMaterial() : this(null) { }
    }
}
